import request from '@/utils/request'

// 查询rooms列表
export function listRooms(query) {
  return request({
    url: '/system/rooms/list',
    method: 'get',
    params: query
  })
}

// 查询rooms详细
export function getRooms(id) {
  return request({
    url: '/system/rooms/' + id,
    method: 'get'
  })
}

// 新增rooms
export function addRooms(data) {
  return request({
    url: '/system/rooms',
    method: 'post',
    data: data
  })
}

// 修改rooms
export function updateRooms(data) {
  return request({
    url: '/system/rooms',
    method: 'put',
    data: data
  })
}

// 删除rooms
export function delRooms(id) {
  return request({
    url: '/system/rooms/' + id,
    method: 'delete'
  })
}

// 获取房间用途数量

export function listPurpose(query){
  return request({
    url: '/system/rooms/purpose',
    method: 'get',
    params: query
  })
}
